<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	
<h:head>
<title>Inserisci Elemento </title>
		<link rel="stylesheet" type="text/css" href="style/reset.css" media="screen,print" />
		<link rel="stylesheet" type="text/css" href="style/print.css" media="print" />
		<link rel="stylesheet" type="text/css" href="style/style.css" media="screen,print" />
		<link rel="stylesheet" type="text/css" href="style/template.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="style/menu.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="pcss/pagina-3.css" media="screen" />
	</h:head>


<h:body>
		<div id="imHeaderBg"></div>
		<div id="imFooterBg"></div>
		<div id="imPage">
			<div id="imHeader">
				<h1 class="imHidden">Area Personale</h1>
			</div>
			<a class="imHidden" href="#imGoToCont" title="Salta il menu di navigazione">Vai ai contenuti</a>
			<a id="imGoToMenu"></a><p class="imHidden">Menu principale:</p>
			<div id="imMnMn" class="auto">
				<ul class="auto">
					<li id="imMnMnNode0" >
						<a href="http://localhost:8080/TravelDreamOnlineWeb">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Home Page</span>
							</span>
						</a>
					</li><li id="imMnMnNode3" >
						<a href="http://localhost:8080/TravelDreamOnlineWeb/user/index.xhtml">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Area Personale</span>
							</span>
						</a>
					</li><li id="imMnMnNode4" class="imMnMnCurrent">
						<a href="http://localhost:8080/TravelDreamOnlineWeb/admin/index.xhtml">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Area Riservata</span>
							</span>
						</a>
					</li><li id="imMnMnNode5">
						<a href="http://localhost:8080/TravelDreamOnlineWeb/contatti.html">
							<span class="imMnMnFirstBg">
								<span class="imMnMnTxt"><span class="imMnMnImg"></span>Contatti</span>
							</span>
						</a>
					</li>
				</ul>
			</div>
			<div id="imContentGraphics"></div>
			<div id="imContent">
			
<!--INSERIRE QUI LA PAGINA>
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
<-->
<h:form id="volo">

		<p:panel header="Volo">
			<h:panelGrid columns="3" id="voloGrid">
				
				
				<h:outputLabel for="nome">Nome:</h:outputLabel>
				<p:inputText id="nome" value="#{elementBean.element.nome}" />
				<p:message for="nome" />
				
				<h:outputLabel for="prezzo">Prezzo:</h:outputLabel>
				<p:inputText id="prezzo" value="#{elementBean.element.prezzo}" converterMessage="Il prezzo non può essere negativo">
					<f:validateDoubleRange minimum="0.0"/>
				</p:inputText>
				<p:message for="prezzo" />
				
				
      			<h:outputLabel for="inlineCal">Data:</h:outputLabel>
      			<p:calendar value="#{elementBean.element.data}" id="inlineCal" showButtonPanel="true" mindate="calwidget.today()" widgetVar="calwidget" readonlyInput="true">  
       			 </p:calendar>  
       			 <p:message for="inlineCal" />

       			 <h:outputLabel for="ora">Ora:</h:outputLabel>
      			<p:inputText id="ora" value="#{elementBean.element.ora}"/>
       			 <p:message for="ora" />
       			 
 				<h:outputLabel for="Cp">Città partenza:</h:outputLabel>
				<p:inputText id="Cp" value="#{elementBean.volo.cittàPartenza}" />
				<p:message for="Cp" />
				      			 
       			        			 
				<h:outputLabel for="Ci">Città arrivo:</h:outputLabel>
				<p:inputText id="Ci" value="#{elementBean.volo.cittàArrivo}" />
				<p:message for="Ci" />

				<h:outputLabel for="Co">Compagnia:</h:outputLabel>
				<p:inputText id="Co" value="#{elementBean.volo.compagnia}" />
				<p:message for="Co" />
				
				<h:outputLabel for="nv">Numero Volo:</h:outputLabel>
				<p:inputText id="nv" value="#{elementBean.volo.numVolo}">
				<f:validateLongRange minimum="1"/>
				 </p:inputText>
				<p:message for="nv" />
	

			<p:commandButton value="Crea" update="voloGrid"
			action="#{elementBean.creaVolo()}" />
				</h:panelGrid>
		</p:panel>
		    <p:commandButton value="Indietro" oncomplete = "window.history.back();"/>
</h:form>

<!--FINE DELLA PAGINA>
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
<-->						
				
								
			</div>		
			<div id="imFooter">
				
			</div>
	</div>
		<span class="imHidden"><a href="#imGoToCont" title="Rileggi i contenuti della pagina">Torna ai contenuti</a> | <a href="#imGoToMenu" title="Naviga ancora nella pagina">Torna al menu</a></span>
		
	<noscript class="imNoScript"><div class="alert alert-red">Per poter utilizzare questo sito è necessario attivare JavaScript.</div></noscript>
				</h:body>
</html>
